function handleWS() {
    return async function(ctx, next) {
        if(!ctx.ws) {
            if(global.websocketServer) {
                ctx.ws = global.websocketServer;
            }
        }
        await next();
    }
}

module.exports = handleWS;